Integrand size = 21, antiderivative size = 106 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {7 a^3 x}{8}-\frac {7 a^3 \cos ^3(c+d x)}{12 d}+\frac {7 a^3 \cos (c+d x) \sin (c+d x)}{8 d}-\frac {a \cos ^3(c+d x) (a+a \sin (c+d x))^2}{5 d}-\frac {7 \cos ^3(c+d x) \left (a^3+a^3 \sin (c+d x)\right )}{20 d} \]
7/8*a^3*x-7/12*a^3*cos(d*x+c)^3/d+7/8*a^3*cos(d*x+c)*sin(d*x+c)/d-1/5*a*co s(d*x+c)^3*(a+a*sin(d*x+c))^2/d-7/20*cos(d*x+c)^3*(a^3+a^3*sin(d*x+c))/d
Time = 0.30 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.33 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {a^3 \cos ^3(c+d x) \left (210 \arcsin \left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (c+d x)}+\sqrt {1+\sin (c+d x)} \left (136-151 \sin (c+d x)-97 \sin ^2(c+d x)+22 \sin ^3(c+d x)+66 \sin ^4(c+d x)+24 \sin ^5(c+d x)\right )\right )}{120 d (-1+\sin (c+d x))^2 (1+\sin (c+d x))^{3/2}} \]
-1/120*(a^3*Cos[c + d*x]^3*(210*ArcSin[Sqrt[1 - Sin[c + d*x]]/Sqrt[2]]*Sqr t[1 - Sin[c + d*x]] + Sqrt[1 + Sin[c + d*x]]*(136 - 151*Sin[c + d*x] - 97* Sin[c + d*x]^2 + 22*Sin[c + d*x]^3 + 66*Sin[c + d*x]^4 + 24*Sin[c + d*x]^5 )))/(d*(-1 + Sin[c + d*x])^2*(1 + Sin[c + d*x])^(3/2))
Time = 0.51 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.07, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 3157, 3042, 3157, 3042, 3148, 3042, 3115, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^2(c+d x) (a \sin (c+d x)+a)^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^2 (a \sin (c+d x)+a)^3dx\) |
\(\Big \downarrow \) 3157 |
\(\displaystyle \frac {7}{5} a \int \cos ^2(c+d x) (\sin (c+d x) a+a)^2dx-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {7}{5} a \int \cos (c+d x)^2 (\sin (c+d x) a+a)^2dx-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3157 |
\(\displaystyle \frac {7}{5} a \left (\frac {5}{4} a \int \cos ^2(c+d x) (\sin (c+d x) a+a)dx-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {7}{5} a \left (\frac {5}{4} a \int \cos (c+d x)^2 (\sin (c+d x) a+a)dx-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {7}{5} a \left (\frac {5}{4} a \left (a \int \cos ^2(c+d x)dx-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {7}{5} a \left (\frac {5}{4} a \left (a \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {7}{5} a \left (\frac {5}{4} a \left (a \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {7}{5} a \left (\frac {5}{4} a \left (a \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {a \cos ^3(c+d x)}{3 d}\right )-\frac {\cos ^3(c+d x) \left (a^2 \sin (c+d x)+a^2\right )}{4 d}\right )-\frac {a \cos ^3(c+d x) (a \sin (c+d x)+a)^2}{5 d}\) |
-1/5*(a*Cos[c + d*x]^3*(a + a*Sin[c + d*x])^2)/d + (7*a*(-1/4*(Cos[c + d*x ]^3*(a^2 + a^2*Sin[c + d*x]))/d + (5*a*(-1/3*(a*Cos[c + d*x]^3)/d + a*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d))))/4))/5
3.1.31.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m - 1)/(f*g*(m + p))), x] + Simp[a*((2*m + p - 1)/(m + p)) Int[(g* Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1), x], x] /; FreeQ[{a, b, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && GtQ[m, 0] && NeQ[m + p, 0] && Integers Q[2*m, 2*p]
Time = 0.40 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.63
method | result | size |
parallelrisch | \(\frac {a^{3} \left (420 d x +6 \cos \left (5 d x +5 c \right )-45 \sin \left (4 d x +4 c \right )-130 \cos \left (3 d x +3 c \right )+120 \sin \left (2 d x +2 c \right )-420 \cos \left (d x +c \right )-544\right )}{480 d}\) | \(67\) |
risch | \(\frac {7 a^{3} x}{8}-\frac {7 a^{3} \cos \left (d x +c \right )}{8 d}+\frac {a^{3} \cos \left (5 d x +5 c \right )}{80 d}-\frac {3 a^{3} \sin \left (4 d x +4 c \right )}{32 d}-\frac {13 a^{3} \cos \left (3 d x +3 c \right )}{48 d}+\frac {a^{3} \sin \left (2 d x +2 c \right )}{4 d}\) | \(90\) |
derivativedivides | \(\frac {a^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )+3 a^{3} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-a^{3} \left (\cos ^{3}\left (d x +c \right )\right )+a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(121\) |
default | \(\frac {a^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{5}-\frac {2 \left (\cos ^{3}\left (d x +c \right )\right )}{15}\right )+3 a^{3} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )-a^{3} \left (\cos ^{3}\left (d x +c \right )\right )+a^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(121\) |
norman | \(\frac {\frac {7 a^{3} x}{8}-\frac {34 a^{3}}{15 d}+\frac {a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {13 a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {13 a^{3} \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}-\frac {a^{3} \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {35 a^{3} x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {35 a^{3} x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {35 a^{3} x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {35 a^{3} x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}+\frac {7 a^{3} x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {20 a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {6 a^{3} \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(267\) |
1/480*a^3*(420*d*x+6*cos(5*d*x+5*c)-45*sin(4*d*x+4*c)-130*cos(3*d*x+3*c)+1 20*sin(2*d*x+2*c)-420*cos(d*x+c)-544)/d
Time = 0.30 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.68 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {24 \, a^{3} \cos \left (d x + c\right )^{5} - 160 \, a^{3} \cos \left (d x + c\right )^{3} + 105 \, a^{3} d x - 15 \, {\left (6 \, a^{3} \cos \left (d x + c\right )^{3} - 7 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, d} \]
1/120*(24*a^3*cos(d*x + c)^5 - 160*a^3*cos(d*x + c)^3 + 105*a^3*d*x - 15*( 6*a^3*cos(d*x + c)^3 - 7*a^3*cos(d*x + c))*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 226 vs. \(2 (99) = 198\).
Time = 0.27 (sec) , antiderivative size = 226, normalized size of antiderivative = 2.13 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\begin {cases} \frac {3 a^{3} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 a^{3} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {a^{3} x \sin ^{2}{\left (c + d x \right )}}{2} + \frac {3 a^{3} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {a^{3} x \cos ^{2}{\left (c + d x \right )}}{2} + \frac {3 a^{3} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} - \frac {a^{3} \sin ^{2}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{3 d} - \frac {3 a^{3} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} + \frac {a^{3} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} - \frac {2 a^{3} \cos ^{5}{\left (c + d x \right )}}{15 d} - \frac {a^{3} \cos ^{3}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a \sin {\left (c \right )} + a\right )^{3} \cos ^{2}{\left (c \right )} & \text {otherwise} \end {cases} \]
Piecewise((3*a**3*x*sin(c + d*x)**4/8 + 3*a**3*x*sin(c + d*x)**2*cos(c + d *x)**2/4 + a**3*x*sin(c + d*x)**2/2 + 3*a**3*x*cos(c + d*x)**4/8 + a**3*x* cos(c + d*x)**2/2 + 3*a**3*sin(c + d*x)**3*cos(c + d*x)/(8*d) - a**3*sin(c + d*x)**2*cos(c + d*x)**3/(3*d) - 3*a**3*sin(c + d*x)*cos(c + d*x)**3/(8* d) + a**3*sin(c + d*x)*cos(c + d*x)/(2*d) - 2*a**3*cos(c + d*x)**5/(15*d) - a**3*cos(c + d*x)**3/d, Ne(d, 0)), (x*(a*sin(c) + a)**3*cos(c)**2, True) )
Time = 0.19 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.86 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=-\frac {480 \, a^{3} \cos \left (d x + c\right )^{3} - 32 \, {\left (3 \, \cos \left (d x + c\right )^{5} - 5 \, \cos \left (d x + c\right )^{3}\right )} a^{3} - 45 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a^{3} - 120 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3}}{480 \, d} \]
-1/480*(480*a^3*cos(d*x + c)^3 - 32*(3*cos(d*x + c)^5 - 5*cos(d*x + c)^3)* a^3 - 45*(4*d*x + 4*c - sin(4*d*x + 4*c))*a^3 - 120*(2*d*x + 2*c + sin(2*d *x + 2*c))*a^3)/d
Time = 0.33 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.84 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {7}{8} \, a^{3} x + \frac {a^{3} \cos \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac {13 \, a^{3} \cos \left (3 \, d x + 3 \, c\right )}{48 \, d} - \frac {7 \, a^{3} \cos \left (d x + c\right )}{8 \, d} - \frac {3 \, a^{3} \sin \left (4 \, d x + 4 \, c\right )}{32 \, d} + \frac {a^{3} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} \]
7/8*a^3*x + 1/80*a^3*cos(5*d*x + 5*c)/d - 13/48*a^3*cos(3*d*x + 3*c)/d - 7 /8*a^3*cos(d*x + c)/d - 3/32*a^3*sin(4*d*x + 4*c)/d + 1/4*a^3*sin(2*d*x + 2*c)/d
Time = 8.39 (sec) , antiderivative size = 277, normalized size of antiderivative = 2.61 \[ \int \cos ^2(c+d x) (a+a \sin (c+d x))^3 \, dx=\frac {7\,a^3\,x}{8}-\frac {\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}-\frac {13\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+\frac {a^3\,\left (105\,c+105\,d\,x\right )}{120}-\frac {a^3\,\left (105\,c+105\,d\,x-272\right )}{120}+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (\frac {a^3\,\left (105\,c+105\,d\,x\right )}{24}-\frac {a^3\,\left (525\,c+525\,d\,x-640\right )}{120}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (\frac {a^3\,\left (105\,c+105\,d\,x\right )}{24}-\frac {a^3\,\left (525\,c+525\,d\,x-720\right )}{120}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (\frac {a^3\,\left (105\,c+105\,d\,x\right )}{12}-\frac {a^3\,\left (1050\,c+1050\,d\,x-800\right )}{120}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (\frac {a^3\,\left (105\,c+105\,d\,x\right )}{12}-\frac {a^3\,\left (1050\,c+1050\,d\,x-1920\right )}{120}\right )-\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \]
(7*a^3*x)/8 - ((13*a^3*tan(c/2 + (d*x)/2)^7)/2 - (13*a^3*tan(c/2 + (d*x)/2 )^3)/2 + (a^3*tan(c/2 + (d*x)/2)^9)/4 + (a^3*(105*c + 105*d*x))/120 - (a^3 *(105*c + 105*d*x - 272))/120 + tan(c/2 + (d*x)/2)^2*((a^3*(105*c + 105*d* x))/24 - (a^3*(525*c + 525*d*x - 640))/120) + tan(c/2 + (d*x)/2)^8*((a^3*( 105*c + 105*d*x))/24 - (a^3*(525*c + 525*d*x - 720))/120) + tan(c/2 + (d*x )/2)^4*((a^3*(105*c + 105*d*x))/12 - (a^3*(1050*c + 1050*d*x - 800))/120) + tan(c/2 + (d*x)/2)^6*((a^3*(105*c + 105*d*x))/12 - (a^3*(1050*c + 1050*d *x - 1920))/120) - (a^3*tan(c/2 + (d*x)/2))/4)/(d*(tan(c/2 + (d*x)/2)^2 + 1)^5)